--======================================================================--
-- @作者: 小九呀
-- @QQ：5268416
-- @创建时间: 2018-03-03 02:34:19
-- @Last Modified time: 2021-03-14 18:27:31
--======================================================================--
randomBoothBot = require("Script/Bot/randomBoothBot")()

local BotManager = class()

function BotManager:初始化()

--	__S服务:输出("=======================假人加载=====================")
	__gge.print(false,11,"=======================")
 	__gge.print(false,10," 假人加载 ")
 	__gge.print(false,11,"=======================\n")

	-- local chatBotCfg = table.loadstring(读入文件("tysj/Bot/ChatBot.txt"))
	-- ChatDb:initWordChatList(chatBotCfg.wordChat)
	-- ChatDb:setWordChatBase(chatBotCfg.wordChatBase)
	-- ChatDb:initSystemList(chatBotCfg.systemChat)
	-- ChatDb:initItemList(chatBotCfg.itemList)
	-- ChatDb:initNameList(chatBotCfg.nameList)

	-- ChatCtrl:initWordChatTime(chatBotCfg.wordTime)
	-- ChatCtrl:initSysChatTime(chatBotCfg.systemTime)

	-- local ftxt = 读入文件("tysj/Bot/FightBot.txt")
	-- local fightBotCfg = table.loadstring(ftxt)
	-- BotDb:initAloneDb(fightBotCfg.botList)
	-- BotDb:initTeamDb(fightBotCfg.teamList)
	-- BotCtrl:initFightTime(fightBotCfg.fightTime)
	-- BotCtrl:initRunTime(fightBotCfg.runTime)
	-- BotCtrl:initShowNumberCtrl(fightBotCfg.botAddTime)

	local itemtxt = 读入文件("tysj/Bot/ItemTable.txt") 	--	物品列表 --
	local itemCfg = table.loadstring(itemtxt)

	BoothDb:initItemTable(itemCfg)

	local bbtxt = 读入文件("tysj/Bot/BBTable.txt")
	local bbCfg = table.loadstring(bbtxt)
	BoothDb:initBBTable(bbCfg)

	-- local boothbottxt =  读入文件("tysj/Bot/BoothBot.txt") 	--	摆摊假人列表 --
	-- local boothBotCfg = table.loadstring(boothbottxt)
	-- BoothCtrl:initAddTime(boothBotCfg.addTime)
	BoothCtrl:initAddTime({ 1000,1000 })
	-- 新的随机机器人
	randomBoothBot:init()
	local boothList = randomBoothBot:generateBotList()
	-- BoothDb:addBoothBot(boothBotCfg.boothList)
	BoothDb:addBoothBot(boothList)

--	__S服务:输出("=======================假人完成=====================")
	__gge.print(false,11,"=======================")
 	__gge.print(false,10," 假人完成 ")
 	__gge.print(false,11,"=======================\n")
end


function BotManager:getBoothBot(botId)
end

function BotManager:isBot(userid)
end

function BotManager:onPlayerJoin(mapid,cid)
	-- BotCtrl:sendBot(mapid,cid)
	BoothCtrl:sendBoothBot(mapid,cid)
end

function BotManager:secondLoop()
	-- ChatCtrl:timeLoop()
	-- BotCtrl:timeLoop()
	BoothCtrl:timeLoop()
end

return BotManager